Skip to content

Maps exercises#2

Open
Markello93 wants to merge 3 commits intomainfrom
maps_exercises
Open

Maps exercises#2
Markello93 wants to merge 3 commits intomainfrom
maps_exercises

Conversation

@Markello93
Copy link
Copy Markdown
Owner

No description provided.

maps/maps.py Outdated
if (
movie["rating_kinopoisk"]
and float(movie["rating_kinopoisk"]) != 0
and len(movie["country"].split(",")) >= 2
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Неэффективно использовать split() для подсчета запятых

maps/maps.py Outdated
):
more_2_countries_movies.append(movie)
rating = map(lambda movie: float(movie["rating_kinopoisk"]), more_2_countries_movies)
return sum(rating) / len(list(more_2_countries_movies))
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

зачем list() там и так список?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants